(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
  ["pages/product/list"], {
    1746: function (a, t, e) {
      "use strict";
      e.r(t);
      var r = e("aa35"),
        i = e.n(r);
      for (var o in r) "default" !== o && function (a) {
        e.d(t, a, (function () {
          return r[a]
        }))
      }(o);
      t["default"] = i.a
    },
    "29c0": function (a, t, e) {
      "use strict";
      (function (a) {
        e("77a0");
        r(e("66fd"));
        var t = r(e("816a"));

        function r(a) {
          return a && a.__esModule ? a : {
            default: a
          }
        }
        a(t.default)
      }).call(this, e("543d")["createPage"])
    },
    "4fee": function (a, t, e) {
      "use strict";
      var r = e("9a12"),
        i = e.n(r);
      i.a
    },
    "816a": function (a, t, e) {
      "use strict";
      e.r(t);
      var r = e("daf8"),
        i = e("1746");
      for (var o in i) "default" !== o && function (a) {
        e.d(t, a, (function () {
          return i[a]
        }))
      }(o);
      e("4fee");
      var c, n = e("f0c5"),
        s = Object(n["a"])(i["default"], r["b"], r["c"], !1, null, null, null, !1, r["a"], c);
      t["default"] = s.exports
    },
    "9a12": function (a, t, e) {},
    aa35: function (a, t, e) {
      "use strict";
      (function (a) {
        Object.defineProperty(t, "__esModule", {
          value: !0
        }), t.default = void 0;
        var r = i(e("a34a"));

        function i(a) {
          return a && a.__esModule ? a : {
            default: a
          }
        }

        function o(a, t, e, r, i, o, c) {
          try {
            var n = a[o](c),
              s = n.value
          } catch (h) {
            return void e(h)
          }
          n.done ? t(s) : Promise.resolve(s).then(r, i)
        }

        function c(a) {
          return function () {
            var t = this,
              e = arguments;
            return new Promise((function (r, i) {
              var c = a.apply(t, e);

              function n(a) {
                o(c, r, i, n, s, "next", a)
              }

              function s(a) {
                o(c, r, i, n, s, "throw", a)
              }
              n(void 0)
            }))
          }
        }
        var n = {
          data: function () {
            return {
              wanlsys: this.$wanlshop.wanlsys(),
              height: this.$wanlshop.wanlsys().windowHeight,
              WanlScroll: 0,
              scrollStype: !1,
              filterIndex: 0,
              priceOrder: 0,
              liststyle: "col-1-10",
              goodsData: [],
              showRight: !1,
              category: "",
              empty: "没有找到任何宝贝",
              params: {
                search: "",
                sort: "weigh",
                order: "asc",
                page: 1,
                filter: {},
                op: {}
              },
              likeData: [],
              drawerType: {
                attribute: !1,
                first: !1,
                city: !1
              },
              drawerData: {
                price: {
                  low: "",
                  high: ""
                },
                brand: [],
                attribute: [],
                sameCity: {
                  name: " 定位中..",
                  choice: !1
                },
                city: [{
                  name: "北京",
                  choice: !1
                }, {
                  name: "天津",
                  choice: !1
                }, {
                  name: "河北",
                  choice: !1
                }, {
                  name: "山西",
                  choice: !1
                }, {
                  name: "内蒙古",
                  choice: !1
                }, {
                  name: "山东",
                  choice: !1
                }, {
                  name: "江苏",
                  choice: !1
                }, {
                  name: "上海",
                  choice: !1
                }, {
                  name: "浙江",
                  choice: !1
                }, {
                  name: "安徽",
                  choice: !1
                }, {
                  name: "福建",
                  choice: !1
                }, {
                  name: "江西",
                  choice: !1
                }, {
                  name: "河南",
                  choice: !1
                }, {
                  name: "湖南",
                  choice: !1
                }, {
                  name: "湖北",
                  choice: !1
                }, {
                  name: "广东",
                  choice: !1
                }, {
                  name: "广西",
                  choice: !1
                }, {
                  name: "海南",
                  choice: !1
                }, {
                  name: "辽宁",
                  choice: !1
                }, {
                  name: "吉林",
                  choice: !1
                }, {
                  name: "黑龙江",
                  choice: !1
                }, {
                  name: "四川",
                  choice: !1
                }, {
                  name: "贵州",
                  choice: !1
                }, {
                  name: "云南",
                  choice: !1
                }, {
                  name: "重庆",
                  choice: !1
                }, {
                  name: "宁夏",
                  choice: !1
                }, {
                  name: "青海",
                  choice: !1
                }, {
                  name: "陕西",
                  choice: !1
                }, {
                  name: "甘肃",
                  choice: !1
                }, {
                  name: "新疆",
                  choice: !1
                }, {
                  name: "西藏",
                  choice: !1
                }, {
                  name: "香港",
                  choice: !1
                }, {
                  name: "澳门",
                  choice: !1
                }, {
                  name: "台湾",
                  choice: !1
                }]
              },
              drawerParams: {},
              reload: !1,
              last_page: 0,
              status: "loading",
              contentText: {
                contentdown: "",
                contentrefresh: "正在加载..",
                contentnomore: "没有更多数据了"
              }
            }
          },
          onLoad: function (a) {

            var xx1 = JSON.parse(a.data);
            wx.request({
              url: 'https://www.xiaoyudiyimei.cn/api/index/fenxi',
              data: {
                uid: wx.getStorageSync("wanlshop:user").id,
                catid: xx1.category_id,
                wikiid:0
              },
              success:function(res){

              }
            })



            if (a.search) this.params.search = a.search, this.drawerParams.search = a.search;
            else if (a.data) {
              var t = JSON.parse(a.data);
              this.drawerParams.category_id = t.category_id, this.category = t.category_name, this.params.filter.category_id = t.category_id, this.params.op.category_id = "in"
            } else console.log("调试模式");
            this.loadData(), this.goodsData.length
          },
          onPullDownRefresh: function () {
            this.params.page = 1, this.reload = !0, this.loadData()
          },
          onReachBottom: function () {
            this.params.page >= this.last_page ? this.status = "noMore" : (this.reload = !1, this.contentText.contentdown = "上拉显示更多", this.params.page = this.params.page + 1, this.status = "loading", this.loadData())
          },
          onPageScroll: function (a) {
            a.scrollTop > this.WanlScroll ? this.scrollStype = !1 : this.scrollStype = !0, a.scrollTop < 0 && (this.scrollStype = !1), this.WanlScroll = a.scrollTop
          },
          onUnload: function () {
            if (this.showRight) return this.closeDrawer(), !0
          },
          methods: {
            loadData: function () {
              var t = this;
              return c(r.default.mark((function e() {
                return r.default.wrap((function (e) {
                  while (1) switch (e.prev = e.next) {
                    case 0:
                      t.$api.get({
                        url: "/wanlshop/product/lists",
                        data: t.params,
                        success: function (e) {
                          a.stopPullDownRefresh(), t.status = "more", t.goodsData = t.reload ? e.data : t.goodsData.concat(e.data), 0 == e.data.length && (t.empty = "没找到与“".concat(t.category).concat(t.params.search, '"相关的宝贝')), t.params.page = e.current_page, t.last_page = e.last_page
                        }
                      });
                    case 1:
                    case "end":
                      return e.stop()
                  }
                }), e)
              })))()
            },
            loadlikeData: function () {
              var a = this;
              return c(r.default.mark((function t() {
                return r.default.wrap((function (t) {
                  while (1) switch (t.prev = t.next) {
                    case 0:
                      a.$api.get({
                        url: "/wanlshop/product/likes?pages=cart",
                        success: function (t) {
                          a.likeData = t.data
                        }
                      });
                    case 1:
                    case "end":
                      return t.stop()
                  }
                }), t)
              })))()
            },
            loadDrawer: function () {
              var a = this;
              this.$api.get({
                url: "/wanlshop/product/drawer",
                data: this.drawerParams,
                success: function (t) {
                  var e = [],
                    r = [];
                  t.brand.forEach((function (a) {
                    var t = {
                      id: a.id,
                      name: a.name,
                      fold: !1,
                      choice: !1
                    };
                    e.push(t)
                  })), t.attribute.forEach((function (a) {
                    var t = [];
                    a.value.forEach((function (a) {
                      var e = {
                        name: a.name,
                        choice: !1
                      };
                      t.push(e)
                    }));
                    var e = {
                      name: a.name,
                      value: t,
                      fold: !1
                    };
                    r.push(e)
                  })), a.drawerData.brand = e, a.drawerData.attribute = r
                }
              })
            },
            tabClick: function (t) {
              this.filterIndex === t && 3 !== t || (this.filterIndex = t, this.priceOrder = 3 === t ? 1 === this.priceOrder ? 2 : 1 : 0, 0 === t && (this.params.sort = "weigh", this.params.order = "desc"), 1 === t && (this.params.sort = "sales", this.params.order = "desc"), 2 === t && (this.params.sort = "createtime", this.params.order = "desc"), 3 === t && 1 === this.priceOrder && (this.params.sort = "price", this.params.order = "desc"), 3 === t && 2 === this.priceOrder && (this.params.sort = "price", this.params.order = "asc"), this.status = "loading", this.params.page = 1, this.reload = !0, this.loadData(), a.pageScrollTo({
                duration: 300,
                scrollTop: 0
              }))
            },
            showDrawer: function () {
              this.showRight = !0, this.drawerType.first || (this.loadDrawer(), this.drawerType.first = !0)
            },
            onDraver: function (a) {
              var t = a.currentTarget.dataset.attribute,
                e = a.currentTarget.dataset.key;
              "brand" == e || "city" == e ? (this.drawerData[e].forEach((function (a, e) {
                e != t && (a.choice = !1)
              })), this.drawerData.sameCity.choice = !1, this.drawerData[e][t].choice = !this.drawerData[e][t].choice) : "sameCity" == e ? (this.drawerData.city.forEach((function (a) {
                a.choice = !1
              })), this.drawerData.sameCity.choice = !this.drawerData.sameCity.choice) : (this.drawerData.attribute[t].value.forEach((function (a, t) {
                t != e && (a.choice = !1)
              })), this.drawerData.attribute[t].value[e].choice = !this.drawerData.attribute[t].value[e].choice)
            },
            onDrawerTo: function () {
              "" != this.drawerData.price.low && "" != this.drawerData.price.high ? (this.params.filter.price = this.drawerData.price.low + "," + this.drawerData.price.high, this.params.op.price = "BETWEEN") : (delete this.params.filter.price, delete this.params.op.price);
              var a = "";
              this.drawerData.city.forEach((function (t) {
                t.choice && (a = t.name)
              })), a ? (this.params.filter["shop.city"] = "%" + a + "%", this.params.op["shop.city"] = "LIKE") : this.drawerData.sameCity.choice ? (this.params.filter["shop.city"] = this.drawerData.sameCity.name, this.params.op["shop.city"] = "LIKE") : (delete this.params.filter["shop.city"], delete this.params.op["shop.city"]);
              var t = "";
              this.drawerData.brand.forEach((function (a) {
                a.choice && (t = a.id)
              })), t ? (this.params.filter.brand_id = t, this.params.op.brand_id = "=") : (delete this.params.filter.brand_id, delete this.params.op.brand_id);
              var e = [];
              this.drawerData.attribute.forEach((function (a, t) {
                a.value.forEach((function (a, t) {
                  a.choice && e.push("%" + a.name + "%")
                }))
              })), e ? (this.params.filter.category_attribute = e.join(","), this.params.op.category_attribute = "LIKE") : (delete this.params.filter.category_attribute, delete this.params.op.category_attribute), this.status = "loading", this.loadData(), this.closeDrawer()
            },
            onDrawerReset: function () {
              this.drawerData.city.forEach((function (a) {
                a.choice = !1
              })), this.drawerData.sameCity.choice = !1, this.loadDrawer()
            },
            onDraverTitle: function (a) {
              var t = a.currentTarget.dataset.key;
              "city" === t ? this.drawerType[t] = !this.drawerType[t] : this.drawerData.attribute[t].fold = !this.drawerData.attribute[t].fold
            },
            closeDrawer: function () {
              this.showRight = !1
            },
            search: function () {
              this.$wanlshop.to("/pages/product/search", "fade-in", 100)
            },
            editListstyle: function () {
              this.liststyle = "col-1-10" == this.liststyle ? "col-2-20" : "col-1-10"
            }
          }
        };
        t.default = n
      }).call(this, e("543d")["default"])
    },
    daf8: function (a, t, e) {
      "use strict";
      e.d(t, "b", (function () {
        return i
      })), e.d(t, "c", (function () {
        return o
      })), e.d(t, "a", (function () {
        return r
      }));
      var r = {
          wanlEmpty: function () {
            return e.e("components/wanl-empty/wanl-empty").then(e.bind(null, "13bf"))
          },
          wanlProduct: function () {
            return Promise.all([e.e("common/vendor"), e.e("components/wanl-product/wanl-product")]).then(e.bind(null, "d93b"))
          },
          uniDrawer: function () {
            return e.e("components/uni-drawer/uni-drawer").then(e.bind(null, "98d4"))
          },
          uniLoadMore: function () {
            return e.e("components/uni-load-more/uni-load-more").then(e.bind(null, "ac38"))
          }
        },
        i = function () {
          var a = this,
            t = a.$createElement;
          a._self._c;
          a._isMounted || (a.e0 = function (t) {
            return a.$wanlshop.back(1)
          })
        },
        o = []
    }
  },
  [
    ["29c0", "common/runtime", "common/vendor"]
  ]
]);
